/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MY_COMM_H
#define __MY_COMM_H

#include "bits/stdint-uintn.h"
#include "bits/stdint-intn.h"

typedef struct{
	uint8_t step;
	uint8_t cnt;
	uint8_t rxlen;
	uint8_t buff[160];
}comm_t;

enum {
	motor_angle = 0xf0,
};

int comm_init(void);
void comm_exit(void);
void comm_uart_handler(uint8_t data);

void comm_tx(uint8_t fun, uint8_t *data, uint8_t datalen);

#endif /* __MY_COMM_H */
